<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>

<SCRIPT type=text/javascript>
var d1,d2 ;
$().ready( function() {
	d1 = $("#dialog1").dialog({
		bgiframe: true,
		autoOpen: false,
		height: 350,
		width:500,
		modal: true,
		open: function() {$("body > div[role=dialog1]").appendTo("form#addMemoForm");}
	});
	d2 = $("#dialog2").dialog({
		bgiframe: true,
		autoOpen: false,
		height: 350,
		width:500,
		modal: true,
		open: function() {$("body > div[role=dialog2]").appendTo("form#chargeForm");}
	});
	$("#submit_button").click(function(){
		if ($("#memo1").val() == "" ){
			alert("请输入备注");
			return false ;
		}
		$("#submit_button").submit();
	});
	$("#submit_button2").click(function(){
		if ($("#orderId").val() == "" ){
			alert("请输入订单编号");
			return false ;
		}
		$("#submit_button2").submit();
	});
});

function _addMemo() {
	d1.dialog('open');
}
function _charge() {
	d2.dialog('open');
}
</SCRIPT>
<h1>汇款管理</h1>
<DIV id="dialog1" title="增加备注" class="consignee">
<form action="addMemo.do" name="addMemoForm" id="addMemoForm" method="post" >
    <fieldset>
     <ul>
        <li>
          <label for="note">备注：</label>
          <span>
            <textarea name=memo id=memo1 cols=40 rows=5></textarea>
          </span></li>
        <li>
          <span><BR/>
          <input type=submit name="s1" name="submit_button" id="submit_button" value="送出" ></input>
          <input type=reset name="s1" value="重填"></input>
          <input type=hidden name="bktId" value="${bank.id}"></input>
          <input type=button name="s2" value="放弃" onClick="d1.dialog('close');"></input>
          </span>
        </li>
      </ul>
      </form>
    </fieldset></form>
</DIV>
<DIV id="dialog2" title="收费处理" class="consignee">
<form action="charge.do" name="chargeForm" id="chargeForm" method="post" >
    <fieldset>
     <ul>
        <li>
          <label for="note">订单编号：</label>
          <span>
            <input type=text name=orderId id=orderId size="20">
          </span></li>
        <li>
          <label for="note">备注：</label>
          <span>
            <textarea name=memo id=memo2 cols=40 rows=5></textarea>
          </span></li>
        <li>
          <span><BR/>
          <input type=submit name="s1" name="submit_button2" id="submit_button2" value="送出" ></input>
          <input type=reset name="s1" value="重填"></input>
          <input type=hidden name="bktId" value="${bank.id}"></input>
          <input type=button name="s2" value="放弃" onClick="d2.dialog('close');"></input>
          </span>
        </li>
      </ul>
      </form>
    </fieldset></form>
</DIV>
<s:form action="update.do" name="update" method="post">
<div class="f-link"><a href="search.do">回汇款查询页</a></div>
<table width="100%" border="1" cellspacing="0" cellpadding="0" class="tb-data">
  <tr>
    <td height="30" align=left><b>汇单编号：</b> ${bank.id} </td>
    <td align=left></td>
    <td align=left><b>状态：</b>${statusMenu.options[bank.status].name}<input type="hidden" name="bktId" value="${bank.id}" /></td>
    <td align=left><b>转入时间：</b>
    		<fmt:formatDate pattern="yyyy/MM/dd HH:mm:ss" value="${bank.billDate}" /></td>
  </tr>
  <tr>
    <td height="30" align=left><b>汇款银行：</b>${bank.sourceBank}</td>
    <td align=left><b>汇款帐户：</b>${bank.sourceAccountNo}</td>
    <td align=left><b>帐户：</b>${bank.sourceAccountName}</td>
    <td align=left><b>金额：</b><font color="#ff3300">${bank.amount}</font></td>
  </tr>
  <tr>
    <td height="30" align=left><b>付款订单编号：</b><font color="#ff3300">${bank.orderId}</font></td>
    <td align=left><b>建档时间：</b><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${bank.dataEntryDate}" /></td>
    <td align=left><b>建档人：</b>${bank.dataEntryMan}</td>
    <td align=left></td>
  </tr>
  <tr>
    <td height="30" colspan="5" valign="top" align=left><b>银行备注</b><BR>
　　<textarea name=bankMemo cols="70" rows="5">${bank.bankMemo}</textarea></td>
  </tr>
  <tr>
    <td height="30" colspan="5" valign="top" align=left><b>内部备注</b><BR>
　　<textarea name=memo cols="70" rows="5">${bank.memo}</textarea></td>
  </tr>
</table>
<div class="f-link"><c:if test='${bank.status == "30"}'><a href="javascript:void(0);" onclick="document.update.submit();return false;">移至待招領</a>/</c:if><!-- <a href="javascript:_charge()">收款处理</a><a href="javascript:_addMemo();">增加备注</a> --><a href="search.do">回汇款查询页</a></div>
</s:form>
